package com.szpx.controller;

import com.szpx.entity.DdwUser;
import com.szpx.service.DdwUserService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.Map;

@RequestMapping("user")
@RestController
public class DdwUserController {
    @Resource
    private DdwUserService userService;
    /*
    注册账号
     */
    @PostMapping("create")
    public Map<String, Object> creatAccount(DdwUser ddwUser){
        return userService.createAccount(ddwUser);
    }

    @PostMapping("login")
    public Map<String, Object> loginAccout(DdwUser ddwUser){
        return userService.loginAccout(ddwUser);
    }

    //登录账号

    //激活账号


   @GetMapping("activation")
    public Map<String,Object> activationAccount(String confirmCode){
        return userService.activationAccount(confirmCode);


    }






}
